package com.sjzn.chahuadi.mfr;

import android.content.Intent;
import android.os.Bundle;

import com.alibaba.android.arouter.launcher.ARouter;
import com.czl.base.config.AppConstants;
import com.sjzn.chahuadi.R;
import com.umeng.message.UmengNotifyClickActivity;

/**
 * 厂商通道配置托管启动的Activity
 * 如点击小米、华为、OPPO、vivo等通道通知消息，启动的Activity
 */
public class MfrMessageActivity extends UmengNotifyClickActivity {

    private static final String TAG = "MfrMessageActivity";

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.mfr_message_layout);
    }

    @Override
    public void onMessage(Intent intent0) {
        super.onMessage(intent0);
//        Bundle bundle = intent.getExtras();
//        if (bundle != null) {
//            Log.d(TAG, "bundle: " + bundle);
//        }
//        final String body = intent.getStringExtra(AgooConstants.MESSAGE_BODY);
//        Log.d(TAG, "body: " + body);
//        if (!TextUtils.isEmpty(body)) {
//            runOnUiThread(() -> ((TextView) findViewById(R.id.tv)).setText(body));
//        }
        ARouter.getInstance()
                .build(AppConstants.Router.Login.A_SPLASH)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                .navigation();
        finish();
    }
}
